﻿module Runner {
    export class Creater extends Phaser.State {
        create() {
            this.input.maxPointers = 1;

            this.stage.disableVisibilityChange = true;

            this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;

            this.game.scale.pageAlignHorizontally = true;
            this.game.scale.pageAlignVertically = true;

            this.game.scale.windowConstraints.bottom = true;

            this.physics.startSystem(Phaser.Physics.P2JS);
            this.physics.p2.gravity.y = 1400;
            this.physics.p2.setImpactEvents(true);
            this.physics.p2.restitution = 0.0;

            this.game.state.start('Preloader', true, false);
        }
    }
}